package com.tempjob.app.vo;

import com.tempjob.common.businesss.mongo.entity.*;
import com.tempjob.common.context.UserContext;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Date;
import java.util.List;

/**
 * @author hui
 * @Date 2024/11/10 14:26
 **/
@Data
@ApiModel
public class UserDetailVO extends UserContext {

    @ApiModelProperty("身份类型：1找工作2招工")
    private List<Integer> userTypes;

    @ApiModelProperty("公司信息")
    private CompanyInfo companyInfo;

    @ApiModelProperty("身份证号码")
    private String identNo;

    @ApiModelProperty("身份证正面图片地址")
    private String identPortraitImg;

    @ApiModelProperty("身份证反面图片地址")
    private String identEmblemImg;

    @ApiModelProperty("签发机关")
    private String identIssueAuthority;

    @ApiModelProperty("有效期限")
    private String identValidPeriod;

    @ApiModelProperty("身份证地址")
    private String identAddress;

    @ApiModelProperty("0未知1男2女")
    private String sex;

    @ApiModelProperty("出生日期")
    private Date birthday;

    @ApiModelProperty("头像")
    private String avatar;

    @ApiModelProperty("状态0未认证1已认证")
    private Integer userStatus;

    @ApiModelProperty("招聘者信息")
    private PublishUserInfo publishUserInfo;

    @ApiModelProperty("学历")
    private String education;

    @ApiModelProperty("个人优势")
    private String advantage;

    @ApiModelProperty("求职状态：1求职中2在职求职")
    private Integer hireStatus;

    @ApiModelProperty("参加工作时间yyyy-MM")
    private String startWorkTime;

    @ApiModelProperty("简历完善状态")
    private Boolean resumeStatus;

    @ApiModelProperty("教育经历")
    private List<UserEducation> userEducations;

    @ApiModelProperty("求职意愿")
    private List<UserIntentionInfo> userIntentionInfos;

    @ApiModelProperty("就业困难证明")
    private UserDifficultProve userDifficultProve;

    public Boolean getResumeStatus() {
        resumeStatus = false;
        if ((userEducations != null && !userEducations.isEmpty()) || (userIntentionInfos != null && !userIntentionInfos.isEmpty())) {
            resumeStatus = true;
        }
        return resumeStatus;
    }
}
